import request from '@/util/request'
import store from '@/vuex/store'
export function getAllQuestionApi(list){
    return request({
        url: 'question/getAllQuestion.do',
        method: 'post',
        data: {
            pageSize: list.pageSize,
            currentPage: list.currentPage,
            token: store.getters.token
        }
    })
}
export function questionDeleteApi(id){
    const value = {
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0,
        param: id
    }
    return request({
        url: 'question/questionDelete.do',
        method: 'post',
        data: value
    })
}
export function changeQuestionApi(question){
    const value = {
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0,
        param: JSON.stringify(question)
    }
    return request({
        url: 'question/changeQuestion.do',
        method: 'post',
        data: value
    })
}